
(define (make-post-request server request-uri data)
  (define uri (string-append "http://" server request-uri))
  (define client ::HttpClient (HttpClient:newHttpClient))
  (define request ::HttpRequest ((((HttpRequest:newBuilder):uri (java.net.URI:create uri)):POST (HttpRequest:BodyPublishers:ofString data)):build))
  (define response (client:send request (HttpResponse:BodyHandlers:ofString)))
  (response:body))

(define (wait-a-moment!)
  (sleep 1e-5))

(include "web-client.scm")
